ATE_ALL=zeros(11,2);
TT_ALL=zeros(11,2);
CI_ATE_ALL=zeros(11,2);
CI_TT_ALL=zeros(11,2);
Nation_change=zeros(11,1);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%   18-24   %%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

load('Chile1824.mat')
ATE_ALL(1,1:2)=[ATE(16,1),ATE(16,2)];
TT_ALL(1,1:2)=[TT(16,1),TT(16,2)];

CI_ATE_ALL(1,1:2)=[CI_ATE(16,1),CI_ATE(16,2)];

CI_TT_ALL(1,1:2)=[CI_TT(16,1),CI_TT(16,2)];
Nation_change(1,1)=delta(16,1);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%   25-29   %%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
load('Chile2529.mat')
ATE_ALL(2,1:2)=[ATE(16,1),ATE(16,2)];
TT_ALL(2,1:2)=[TT(16,1),TT(16,2)];

CI_ATE_ALL(2,1:2)=[CI_ATE(16,1),CI_ATE(16,2)];

CI_TT_ALL(2,1:2)=[CI_TT(16,1),CI_TT(16,2)];
Nation_change(2,1)=delta(16,1);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%   30-34   %%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
load('Chile3034.mat')
ATE_ALL(3,1:2)=[ATE(16,1),ATE(16,2)];
TT_ALL(3,1:2)=[TT(16,1),TT(16,2)];

CI_ATE_ALL(3,1:2)=[CI_ATE(16,1),CI_ATE(16,2)];

CI_TT_ALL(3,1:2)=[CI_TT(16,1),CI_TT(16,2)];
Nation_change(3,1)=delta(16,1);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%   35-39   %%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
load('Chile3539.mat')
ATE_ALL(4,1:2)=[ATE(16,1),ATE(16,2)];
TT_ALL(4,1:2)=[TT(16,1),TT(16,2)];

CI_ATE_ALL(4,1:2)=[CI_ATE(16,1),CI_ATE(16,2)];

CI_TT_ALL(4,1:2)=[CI_TT(16,1),CI_TT(16,2)];
Nation_change(4,1)=delta(16,1);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%   40-44   %%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
load('Chile4044.mat')
ATE_ALL(5,1:2)=[ATE(16,1),ATE(16,2)];
TT_ALL(5,1:2)=[TT(16,1),TT(16,2)];

CI_ATE_ALL(5,1:2)=[CI_ATE(16,1),CI_ATE(16,2)];

CI_TT_ALL(5,1:2)=[CI_TT(16,1),CI_TT(16,2)];
Nation_change(5,1)=delta(16,1);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%   45-49   %%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
load('Chile4549.mat')
ATE_ALL(6,1:2)=[ATE(16,1),ATE(16,2)];
TT_ALL(6,1:2)=[TT(16,1),TT(16,2)];

CI_ATE_ALL(6,1:2)=[CI_ATE(16,1),CI_ATE(16,2)];

CI_TT_ALL(6,1:2)=[CI_TT(16,1),CI_TT(16,2)];
Nation_change(6,1)=delta(16,1);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%   50-54   %%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
load('Chile5054.mat')
ATE_ALL(7,1:2)=[ATE(16,1),ATE(16,2)];
TT_ALL(7,1:2)=[TT(16,1),TT(16,2)];

CI_ATE_ALL(7,1:2)=[CI_ATE(16,1),CI_ATE(16,2)];

CI_TT_ALL(7,1:2)=[CI_TT(16,1),CI_TT(16,2)];
Nation_change(7,1)=delta(16,1);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%   55-59   %%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
load('Chile5559.mat')
ATE_ALL(8,1:2)=[ATE(16,1),ATE(16,2)];
TT_ALL(8,1:2)=[TT(16,1),TT(16,2)];

CI_ATE_ALL(8,1:2)=[CI_ATE(16,1),CI_ATE(16,2)];

CI_TT_ALL(8,1:2)=[CI_TT(16,1),CI_TT(16,2)];
Nation_change(8,1)=delta(16,1);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%   60-64   %%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
load('Chile6064.mat')
ATE_ALL(9,1:2)=[ATE(16,1),ATE(16,2)];
TT_ALL(9,1:2)=[TT(16,1),TT(16,2)];
CI_ATE_ALL(9,1:2)=[CI_ATE(16,1),CI_ATE(16,2)];
CI_TT_ALL(9,1:2)=[CI_TT(16,1),CI_TT(16,2)];
Nation_change(9,1)=delta(16,1);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%   65-69   %%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
load('Chile6569.mat')
ATE_ALL(10,1:2)=[ATE(16,1),ATE(16,2)];
TT_ALL(10,1:2)=[TT(16,1),TT(16,2)];
CI_ATE_ALL(10,1:2)=[CI_ATE(16,1),CI_ATE(16,2)];
CI_TT_ALL(10,1:2)=[CI_TT(16,1),CI_TT(16,2)];
Nation_change(10,1)=delta(16,1);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%   70-74   %%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
load('Chile7074.mat')
ATE_ALL(11,1:2)=[ATE(16,1),ATE(16,2)];
TT_ALL(11,1:2)=[TT(16,1),TT(16,2)];
CI_ATE_ALL(11,1:2)=[CI_ATE(16,1),CI_ATE(16,2)];
CI_TT_ALL(11,1:2)=[CI_TT(16,1),CI_TT(16,2)];
Nation_change(11,1)=delta(16,1);

AGE={'18-24';'25-29';'30-34';'35-39';'40-44';'45-49';'50-54';'55-59';'60-64';'65-69';'70-74'};
xaxis=1:11;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%          Graphs           %%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
subplot(2,1,1)

%boxplot([CI_ATE_ALL(:,1),ATE_ALL,CI_ATE_ALL(:,2)]','orientation','horizontal')
boxplot([CI_ATE_ALL(:,1),ATE_ALL,CI_ATE_ALL(:,2)]',AGE)
grid on
axis([0 12 -0.8 0.8])
title('ATE  ') 
%xlabel('AGE')
%ylabel('\Delta y')
hold on 
scatter(xaxis,Nation_change,'b*')%or b*r+
hold off
subplot(2,1,2)

%boxplot([CI_TT_ALL(:,1),TT_ALL,CI_TT_ALL(:,2)]','color', hsv(1))
boxplot([CI_TT_ALL(:,1),TT_ALL,CI_TT_ALL(:,2)]',AGE')
grid on

axis([0 12 -0.8 0.8])
title(' ATT  ') 
%xlabel('AGE')
%ylabel('\Delta y')
hold on 
scatter(xaxis,Nation_change,'b*')%or b*r+
hold off